<div class="row" style="margin-top: 1em">

  <div class="col-sm-1">
    <a class="btn btn-default btn-block" ui-sref="lesson.callname.list">
      返回
    </a>
  </div>

  <div class="col-sm-8">
    <p class="text-primary lead">
      {{  currentList.name }}
    </p>
  </div>

</div>

<hr/>

<div class="row">

  <div class="col-sm-6">

    <div class="row">
      <div class="col-sm-3 col-xs-6">
        <button class="btn btn-success btn-block" ng-click="addStudent()">添加</button>
      </div>
      <div class="col-sm-3 col-xs-6">
        <button class="btn btn-danger btn-block" ng-click="destroy()" ng-disabled="!currentList.students.length">删除</button>
      </div>
      <div class="col-sm-3 col-xs-6">
        <button class="btn btn-warning btn-block" ng-click="selectedAll()" ng-disabled="!currentList.students.length">全选</button>
      </div>
      <div class="col-sm-3 col-xs-6">
        <button class="btn btn-info btn-block" ng-click="inverseSelected()" ng-disabled="!currentList.students.length">反选</button>
      </div>
    </div>

    <div class="row" style="margin-top: 1em">
      <div class="col-sm-12" ng-hide="currentList.students.length">
        <p class="text-info text-center lead">列表为空</p>
      </div>
      <div class="col-sm-12" ng-show="currentList.students.length">
        <table class="table table-hover">

          <thead>
          <tr>
            <th>选择</th>
            <th>编号</th>
            <th>学号</th>
            <th>姓名</th>
            <th>缺勤次</th>
          </tr>

          </thead>
          <tbody>
          <tr ng-repeat="currentStudent in currentList.students" ng-click="selected(currentStudent)">
            <td><input type="checkbox" ng-checked="currentStudent.selected" /></td>
            <td>{{ currentStudent.id}}</td>
            <td>{{ currentStudent.number}}</td>
            <td>{{ currentStudent.name }}</td>
            <td>{{ currentStudent.absent_times}}</td>
          </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>

  <div class="col-sm-6">

    <div class="row">
      <div class="col-sm-offset-1 col-sm-8">
        <p class="text-info">
          <span class="lead">列表备注：</span> <br />
          <span>{{ currentList.description }}</span>
        </p>
      </div>
    </div>

    <div class="row">

      <div class="col-sm-offset-1 col-sm-8">

        <h2>配置点名</h2>

        <div class="radio" ng-repeat="currentMethod in callnameMethods">
          <label>
            <input type="radio" name="selectedMethod"  ng-model="selectedMethod" ng-change="changeMethod(currentMethod.value)" ng-value="currentMethod.value">
            {{ currentMethod.label }}
          </label>
        </div>

        <div class="col-sm-6">
          <button class="btn btn-primary btn-block" ng-click="startCallname()">开始点名</button>
        </div>
      </div>
    </div>
  </div>


</div>

